<!-- 首页 -->
<template>
	<view class="content">
		<image class="logo" src="/static/user_top_bg.png" mode="widthFix"></image>

		<view class="text-area">
			<!-- 接下来view在这儿画 -->

			<!-- 预留titlebar -->
			<u-navbar :fixed="false" bgColor="transparent">
				<!-- <view style="height: 60rpx;"></view> -->

				<!-- 界面view -->
				<view class="map-wrap" slot="left" @click="handleLocationClick">
					<u-icon name="map" color="#ffffff" size="16"></u-icon>
					<text class="map-wrap-text">西安市未央区</text>
					<u-icon name="arrow-down-fill" size="14"></u-icon>
				</view>
			</u-navbar>
			<view class="searchBgView" @click="handleSearchClick">
				<view class="search">
					<view class="search-icon">
						<u-icon name="search" size="24" label-pos="right" label="搜索商品" space="12"></u-icon>
					</view>
					<view class="search-right">
						搜索
					</view>
				</view>
				<!-- <u-search v-model="keyword" @custom="search" placeholder="搜索商品" height="35" bgColor="#F9F9F9"></u-search> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
			handleLocationClick() {
				console.log('位置View被点击了');
				// 在这里执行点击后的逻辑
			},
			handleSearchClick() {
				console.log('搜索View被点击了');
				// 在这里执行点击后的逻辑
			}
		},
	}
</script>

<style>
	.content {
		/* width: 750rpx; */
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		width: 750rpx;
		position: absolute;
		left: 0;
		top: 0;
		z-index: 8;
	}

	.text-area {
		width: 100%;
		position: absolute;
		left: 0;
		top: 0;
		z-index: 9;
	}

	.title {
		font-size: 70rpx;
		color: #8f8f94;
	}

	.map-wrap {
		display: flex;
		align-items: center;
		/* padding: 4px 6px; */
		/* background-color: rgba(240,240, 240, 0.35); */
		color: #fff;
		font-size: 40rpx;
		margin-left: 36rpx;
	}

	.map-wrap-text {
		padding: 0 6rpx;
	}

	.searchBgView {
		display: flex;
		flex-direction: row;
		align-items: center;
		/* padding: 10rpx 12rpx 15rpx 12rpx; */
		height: 120rpx;
		width: 100%;
		background-color: red
	}

	.search {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		background-color: #f9f9f9;
		/* 背景颜色 */
		margin-left: 30rpx;
		/* 内边距 */
		width: 70%;
		border-radius: 50rpx;
		/* 圆角的半径 */
		height: 80rpx;
	}

	.search-icon {
		margin-left: 36rpx;
	}

	.search-right {
		font-size: 32rpx;
		color: #ffffff;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		padding: 2rpx 25rpx;
		margin-right: 16rpx;
		border-radius: 30rpx;
		/* 圆角的半径 */
		background: linear-gradient(to right, #FF9D39 0%, #FF5340 100%);
		 
	} 

	.search-text {
		size: 10rpx;
		color: #999999;
		margin-top: 2rpx;

	}
</style>